<?php /* Smarty version 2.6.26, created on 2013-12-23 09:20:58
         compiled from admin/tenders.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'geturl', 'admin/tenders.html', 4, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'admin/header.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<table>
    <div>
 <form method="post" action="<?php echo smarty_function_geturl(array('action' => 'tenders'), $this);?>
" id="filter-form">
     <fieldset> Категории
    <select name='cats_filter[]' id='cats_filter' data-placeholder="Выбрать категорию" class="chosen-select_cat" multiple style="width:300px;" tabindex="4">
<option value="0" ></option>
<?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cat']):
?>
<?php if (in_array ( $this->_tpl_vars['cat']->getId() , $this->_tpl_vars['cats_filter'] )): ?>
<option value="<?php echo $this->_tpl_vars['cat']->getId(); ?>
" selected='selected'><?php echo $this->_tpl_vars['cat']->name; ?>
</option>
<?php else: ?>
<option value="<?php echo $this->_tpl_vars['cat']->getId(); ?>
"><?php echo $this->_tpl_vars['cat']->name; ?>
</option>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
</select>
    Проекты
<select name='projects_filter[]' id='projects_filter' data-placeholder="Выбрать проект" class="chosen-select_project" multiple style="width:300px;" tabindex="4">
<option value='0'></option>
<?php $_from = $this->_tpl_vars['projects']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['project']):
?>
<?php if (in_array ( $this->_tpl_vars['project']->getId() , $this->_tpl_vars['projects_filter'] )): ?>
<option value="<?php echo $this->_tpl_vars['project']->getId(); ?>
" selected='selected'><?php echo $this->_tpl_vars['project']->name; ?>
</option>
<?php else: ?>
<option value="<?php echo $this->_tpl_vars['project']->getId(); ?>
"><?php echo $this->_tpl_vars['project']->name; ?>
</option>
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
</select>
   Активные:
<select name='archive_filter' id='projects_filter' data-placeholder="Показывать все" class="chosen-select_project" style="width:300px;" tabindex="4">
<?php if ($this->_tpl_vars['archive_filter'] == ''): ?>
<option value="2" selected='selected'>Все</option>
<?php else: ?>
<option value="2">Все</option>
<?php endif; ?>

<?php if ($this->_tpl_vars['archive_filter'] == 0): ?>
<option value="0" selected='selected'>Активные</option>
<?php else: ?>
<option value="0">Активные</option>
<?php endif; ?>

<?php if ($this->_tpl_vars['archive_filter'] == 1): ?>
<option value="1" selected='selected'>Не активные</option>
<?php else: ?>
<option value="1">Не активные</option>
<?php endif; ?>

</select>   
            <div class="submit">
            <input type="submit" value="Фильтр" />
        </div>
    </fieldset>
 </form>
</div>
    <tr> 
        <th>Имя</th>
        <th>Описание</th>
        <th>Менеджер</th>
        <th>Дата добавления</th>
        <th>Дата окончания</th>  
        <th>В архиве</th>  
        <th>Операции</th>
    </tr>
<?php $_from = $this->_tpl_vars['tenders']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['tender']):
?>
<tr id="tr_<?php echo $this->_tpl_vars['tender']->getId(); ?>
">
    <td> <a href="/tender/<?php echo $this->_tpl_vars['tender']->getId(); ?>
" target="_blank" id="name_<?php echo $this->_tpl_vars['tender']->getId(); ?>
"> <?php echo $this->_tpl_vars['tender']->name; ?>
</a><br /><a href="<?php echo smarty_function_geturl(array('route' => 'tendermembers','id' => $this->_tpl_vars['tender']->getId()), $this);?>
">Список участников</a></td>
    <td> <?php echo $this->_tpl_vars['tender']->about; ?>
</td>
    <td> <?php echo $this->_tpl_vars['tender']->manager; ?>
</td>
    <td> <?php echo $this->_tpl_vars['tender']->start_date; ?>
</td>
    <td> <?php echo $this->_tpl_vars['tender']->end_date; ?>
</td>
    <td id="arc_<?php echo $this->_tpl_vars['tender']->getId(); ?>
"> <?php if ($this->_tpl_vars['tender']->archive == '0'): ?>НЕТ<?php else: ?>ДА<?php endif; ?></td>
    <td>
    <a href="<?php echo smarty_function_geturl(array('route' => 'edittender','id' => $this->_tpl_vars['tender']->getId()), $this);?>
">Редактировать</a>
    | <a onclick="archivetender(<?php echo $this->_tpl_vars['tender']->getId(); ?>
,<?php echo $this->_tpl_vars['tender']->archive; ?>
);" id="arch_<?php echo $this->_tpl_vars['tender']->getId(); ?>
" style="cursor: pointer"><?php if ($this->_tpl_vars['tender']->archive == '0'): ?>В архив<?php else: ?>Из архива<?php endif; ?> </a>
    | <a onclick="deletetender(<?php echo $this->_tpl_vars['tender']->getId(); ?>
);" style="cursor: pointer">Удалить</a>
    <br>  <label for="form_end_date">Продлить до:</label><input type='text' class='form_end_date' id='update_<?php echo $this->_tpl_vars['tender']->getId(); ?>
' style='width:70px;'><input type='button' onclick='updatedate(<?php echo $this->_tpl_vars['tender']->getId(); ?>
)' name='date' value='ОК'></td>
</tr>
<?php endforeach; endif; unset($_from); ?>
</table>
<br />
<br />
<a href="<?php echo smarty_function_geturl(array('route' => 'addtender'), $this);?>
">Новый тендер</a>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'admin/footer.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>